package com.csx.governance.traffic.mq.rocketmq;

import org.apache.rocketmq.client.producer.MessageQueueSelector;
import org.apache.rocketmq.common.message.Message;
import org.apache.rocketmq.common.message.MessageQueue;

import java.util.List;

/**
 * 消息队列选择器. 当向Topic发送消息时，实际上是 按照轮询算法选择一个队列进行发送，
 * 该扩展点可以支持自定义 选择发送的队列
 * @author cuisongxu
 * @date 2023/2/28 17:16
 */
public class TrafficMessageQueueSelector implements MessageQueueSelector {

    @Override
    public MessageQueue select(List<MessageQueue> mqs, Message msg, Object arg) {
        System.out.println("TrafficMessageQueueSelector#select");
        return null;
    }
}
